/*
 * io.h
 *
 *  Created on: 03.07.2012
 *      Author: zajost
 */

#ifndef IO_H_
#define IO_H_


typedef enum
{
	
	ledFrontLeftRed = 1,
	ledFrontLeftGreen = 2,
	ledFrontLeftBlue = 4,
	
	ledFrontLeftCyan = ledFrontLeftGreen | ledFrontLeftBlue,
	ledFrontLeftMagenta = ledFrontLeftRed | ledFrontLeftBlue,
	ledFrontLeftYellow = ledFrontLeftRed | ledFrontLeftGreen,
	ledFrontLeftWhite = ledFrontLeftRed | ledFrontLeftGreen | ledFrontLeftBlue,
	ledFrontLeft = (ledFrontLeftRed | ledFrontLeftGreen | ledFrontLeftBlue),
	
	ledFrontRightRed = 8,
	ledFrontRightGreen = 16,
	ledFrontRightBlue = 32,
	ledFrontRightCyan = ledFrontRightGreen | ledFrontRightBlue,
  ledFrontRightMagenta = ledFrontRightRed | ledFrontRightBlue,
  ledFrontRightYellow = ledFrontRightRed | ledFrontRightGreen,
  ledFrontRightWhite = ledFrontRightRed | ledFrontRightGreen | ledFrontRightBlue,
	ledFrontRight = (ledFrontRightRed | ledFrontRightGreen | ledFrontRightBlue),
	
	ledFrontRed = ledFrontLeftRed | ledFrontRightRed,
	ledFrontGreen = ledFrontLeftGreen | ledFrontRightGreen,
	ledFrontBlue = ledFrontLeftBlue | ledFrontRightBlue,
	ledFrontCyan = ledFrontGreen | ledFrontBlue,
	ledFrontMagenta = ledFrontRed | ledFrontBlue,
	ledFrontYellow = ledFrontRed | ledFrontGreen,
	ledFrontWhite = ledFrontLeft | ledFrontRight,
	ledFront = ledFrontLeft | ledFrontRight,
	
	ledRear = 64,
	ledBottom = 128,
	
	ledAll = 0xff,
	ledNone = 0
} Leds;

typedef enum
{
  colOff,
  colRed,
  colGreen,
  colBlue,
  colYellow,
  colCyan,
  colMagenta,
  colWhite
} LedColor;

typedef enum
{
	bpUp,
	bpDown,
	bpLeft,
	bpRight,
	bpCenter
} PushButton;


void ioSetLed(Leds led);

void ioClearLed(Leds led);


PushButton ioGetPushButtonState(void);

char ioGetSwitchState(void);

uint8 ioParseCommand(char *cmd);

void ioInit(void);

#endif /* IO_H_ */
